package com.itheima.mapper;

import com.itheima.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@Mapper
public interface UserMapper {
    @Select("select * from user ")
    List<User> selectAll();
    @Select("delete user where id=#{id}")
    int deleteById(String id);
    @Select("insert into user values (null ,#{username},#{password},#{birthday},#{gender},#{email},#{phone},#{address})")
    int add( User user);
    int update(User user);

}
